\(\int \frac {(d+e x) (2-3 x+x^2)}{4-5 x^2+x^4} \, dx\) [74]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 22 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=(d-e) \log (1+x)-(d-2 e) \log (2+x) \]

[Out]

(d-e)*ln(1+x)-(d-2*e)*ln(2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1600, 646, 31} \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=(d-e) \log (x+1)-(d-2 e) \log (x+2) \]

[In]

Int[((d + e*x)*(2 - 3*x + x^2))/(4 - 5*x^2 + x^4),x]

[Out]

(d - e)*Log[1 + x] - (d - 2*e)*Log[2 + x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 646

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {d+e x}{2+3 x+x^2} \, dx \\ & = -\left ((d-2 e) \int \frac {1}{2+x} \, dx\right )+(d-e) \int \frac {1}{1+x} \, dx \\ & = (d-e) \log (1+x)-(d-2 e) \log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=(d-e) \log (1+x)+(-d+2 e) \log (2+x) \]

[In]

Integrate[((d + e*x)*(2 - 3*x + x^2))/(4 - 5*x^2 + x^4),x]

[Out]

(d - e)*Log[1 + x] + (-d + 2*e)*Log[2 + x]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.09

method result size
default \(\left (-d +2 e \right ) \ln \left (x +2\right )+\left (d -e \right ) \ln \left (x +1\right )\) \(24\)
norman \(\left (-d +2 e \right ) \ln \left (x +2\right )+\left (d -e \right ) \ln \left (x +1\right )\) \(24\)
parallelrisch \(\ln \left (x +1\right ) d -\ln \left (x +1\right ) e -\ln \left (x +2\right ) d +2 \ln \left (x +2\right ) e\) \(29\)
risch \(-\ln \left (x +2\right ) d +2 \ln \left (x +2\right ) e +\ln \left (-x -1\right ) d -\ln \left (-x -1\right ) e\) \(33\)

[In]

int((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x,method=_RETURNVERBOSE)

[Out]

(-d+2*e)*ln(x+2)+(d-e)*ln(x+1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=-{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + {\left (d - e\right )} \log \left (x + 1\right ) \]

[In]

integrate((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="fricas")

[Out]

-(d - 2*e)*log(x + 2) + (d - e)*log(x + 1)

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.32 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=\left (- d + 2 e\right ) \log {\left (x + \frac {4 d - 6 e}{2 d - 3 e} \right )} + \left (d - e\right ) \log {\left (x + 1 \right )} \]

[In]

integrate((e*x+d)*(x**2-3*x+2)/(x**4-5*x**2+4),x)

[Out]

(-d + 2*e)*log(x + (4*d - 6*e)/(2*d - 3*e)) + (d - e)*log(x + 1)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=-{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + {\left (d - e\right )} \log \left (x + 1\right ) \]

[In]

integrate((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="maxima")

[Out]

-(d - 2*e)*log(x + 2) + (d - e)*log(x + 1)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.09 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=-{\left (d - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + {\left (d - e\right )} \log \left ({\left | x + 1 \right |}\right ) \]

[In]

integrate((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="giac")

[Out]

-(d - 2*e)*log(abs(x + 2)) + (d - e)*log(abs(x + 1))

Mupad [B] (verification not implemented)

Time = 7.89 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx=\ln \left (x+1\right )\,\left (d-e\right )-\ln \left (x+2\right )\,\left (d-2\,e\right ) \]

[In]

int(((d + e*x)*(x^2 - 3*x + 2))/(x^4 - 5*x^2 + 4),x)

[Out]

log(x + 1)*(d - e) - log(x + 2)*(d - 2*e)